package com.asia5b.a5mall.order.adapter

import com.asia5b.a5bmall.resource.ResString
import com.asia5b.a5mall.middleware.model.order.AftersaleModel
import com.asia5b.a5mall.order.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * Created by zhangyuncai on 2020/1/13.
 */
class AftersaleAdapter(list:ArrayList<AftersaleModel>):
BaseQuickAdapter<AftersaleModel, BaseViewHolder>(R.layout.item_aftersale_adapter,list){
    override fun convert(helper: BaseViewHolder, item: AftersaleModel) {
        //售后编号
        helper.setText(R.id.tv_aftersale_sn,String.format(ResString.get(R.string.售后编号_数),"${item.sn}"))
        //售后状态
        helper.setText(R.id.tv_aftersale_state,item.refund_status_text)
        //售后进度
        helper.setText(R.id.tv_aftersale_progress,item.refuse_type_text)
        //售后退款
        helper.setText(R.id.tv_aftersale_price, String.format(ResString.get(R.string.数_数_积分),"${item.refund_price}","${item.refund_point}"))
    }
}